package com.lemobar.pay.model;

import com.lemobar.pay.model.alipay.response.AliPayAsyncResponse;
import com.lemobar.pay.model.wxpay.response.WxPayAsyncResponse;
import lombok.Data;

import java.util.Date;

/**
 * 异步通知 解析响应
 * wx {@link WxPayAsyncResponse}
 * ali {@link AliPayAsyncResponse}
 */
@Data
public class NotifyResponse {

    /**
     * appid
     * wx -> appid
     */
    private String appId;

    /**
     * 用户标识
     * wx -> openid
     * ali -> buyer_id
     */
    private String openid;

    /**
     * 商家订单号
     * wx -> out_trade_no
     * ali -> out_trade_no
     */
    private String orderId;


    /**
     * 外部订单号
     * wx -> transaction_id
     * ali -> trade_no
     */
    private String outOrderId;


    /**
     * 订单金额 (元)
     * wx -> total_fee
     * ali ->  total_amount
     */
    private Double orderAmount;


    /**
     * 支付完成时间
     * 订单支付时间，格式为yyyyMMddHHmmss          <br>
     * wx -> time_end                           <br>
     * ali -> gmt_payment
     */
    private Date finishTime;
}
